<template>
  <el-container v-if="logoutInfo">
  <el-header style="padding:0"><div style="position:fixed;width:100%;"><new-header></new-header></div></el-header>
  <el-main style="padding:0"><router-view></router-view></el-main>
</el-container>
</template>
<script>
import newHeader from './common/CommonNewHeader.vue'
export default {
  components: {
    newHeader
  },
  data () {
    return {
      logoutInfo: true
    }
  },
  methods: {
    onloadOpt () {
      this.logoutInfo = false
      this.$nextTick(() => (this.logoutInfo = true))
    }
  },
  watch: {
    '$store.state.tab.keepAliveVue2' (newVal, oldVal) {
      // console.log('刷新')
      this.onloadOpt()
    }
  }
}
</script>
<style scoped lang='less'>
el-header{
  height:60px;
}
el-main{
  height:80vh;
}
</style>
